<%@ page language="java" pageEncoding="utf-8"%>

<!DOCTYPE html>
<html>
<head>
    <%@include file="../common/base.jsp"%>
	<meta charset="utf-8" />
	<meta name ="viewport" content ="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1" />
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="Cache-Control" content="no-cache,must-revalidate">
	<meta http-equiv="expires" content="0">
	<title>评价详情</title>
    <link rel="stylesheet" type="text/css" href="${base}/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="${base}/css/global.css?version=${version}">
    <link rel="stylesheet" type="text/css" href="${base}/css/takecar.css?version=${version}">
    <style type="text/css">
        .layui-layer {
            border-radius: 0px !important;
        }
    </style>
</head>
<body>
    <div class="container-fluid">
    	<div class="divBox driver-info">
			<%@include file="driverHtml.jsp"%>
			<p class="tip">到达目的地，订单已完成</p>
    	</div>
		<%@include file="startEnd.jsp"%>

		<div>
			<div class="paymoney" style="text-align: center;margin-top: 20px">
				<div class="m-totalFare">共<span id="totalFare"></span>元</div>
				<div class="m-totalFare"><a class="m-totalFare m-fareinfo" href="#">查看明细</a></div>
				<a class="text-center btn-rated" href="#">
					<img class="img" src="${base}/images/star_big.png">
					<img class="img" src="${base}/images/star_big.png">
					<img class="img" src="${base}/images/star_big.png">
					<img class="img" src="${base}/images/star_big.png">
					<img class="img" src="${base}/images/star_big.png">
				</a>
			</div>
		</div>
    </div>
</body>
<script type="text/javascript" src="${base}/js/jquery.min.js"></script>
<script type="text/javascript" src="${base}/plugin/layer-v3.0.3/layer.js"></script>
<script type="text/javascript" src="${base}/js/localStorageOpt.js?version=${version}"></script>
<%--<script type="text/javascript" src="${base}/plugin/crypto-js/crypto-js.min.js"></script>--%>
<%--<script type="text/javascript" src="${base}/plugin/jsencrypt/jsencrypt.min.js"></script>--%>
<script type="text/javascript" src="${base}/js/utils.js?version=${version}"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
	
	var $document = $(document);
	var typeModule=''
    var yun=new yueajax( "${openId}");
    $document.on('touchend','.btn-rated',function(e){
        layer.open({
            type: 2,
            title: false,
            closeBtn: false,
            shadeClose: false,
            //skin: 'layui-layer-rim', //加上边框
            area: ['100%', '350px'], //宽高,
            shadeClose: true,
            anim: 'up',
            content: '${base}/yue/ratedialog?orderUuid='+yun.orderUuid
            "&num="+($(e.target).index()+1),
            offset: 'lb'
        });
    });
    //    费用详情
    $document.on('touchend', '.m-fareinfo', function () {
        layer.open({
            type: 2,
            title: false,
            closeBtn: false,
            shadeClose: false,
            //skin: 'layui-layer-rim', //加上边框
            area: ['100%', '100%'], //宽高,
            shadeClose: true,
            anim: 'up',
            content: '${base}/yue/fareInfo?orderUuid='+yun.orderUuid+'&typemodule='+typeModule,
            offset: 'lb',
            success:function(index){
                index.addClass('notradius')
            }
        });
    });
    getOrderStatus(function (data) {
        //订单创建时间
        var cTime=new Date(data.data.createOn);
        var driver=data.data.driver;
        var cTobj=yun.time_count(cTime)
        $('#faceimg').attr('src',driver.face || '${base}/images/man.png');
        $('#driver_name').html(driver.name);
        $('#driver_score').append(driver.score)
        $('#driver_orderCount').html(driver.orderCount+'单')
        $('#driver_plateNum').html(driver.plateNum)
        $('#driver_carColor_brandName').html(driver.carColor+driver.brandName);
        $('#driver_mobile').attr('href','tel:'+driver.mobile);
        $('#clickCall').attr('href','tel:'+driver.mobile);
        $('#creadtime').html(cTobj.day+'  '+cTobj.hour+cTime.format('hh:mm'));
        $("#originDetailAddressText").html(data.data.originAddress);
        $("#destDetailAddressText").html(data.data.destAddress);
        $('.m-fareinfo').attr('orderUuid',yun.orderUuid)
        typeModule=data.data.typeModule

    })
    function getOrderStatus(callback) {
        yun.order_ajax(function(data){
            var d=data.data;
            if (d.subStatus != 600) {
                changeUrl(data.data.subStatus,yun.orderUuid);
            }

            //请求司机等待时间和等待费用
            if(typeof callback =="function"){
                callback(data);
            }
            $('#totalFare').html(d.totalFare);
        },function (data) {

        })
    }
});
</script>
</html>